<% title_string = t("views.series.heading", user: @user.name) %>
<% description_string = t("views.series.meta.description", title: title_string, site: community_name) %>

<%= content_for :page_meta do %>
  <%= render "collections/meta", title_string: title_string, description_string: description_string, path: "#{@user.username}/series/" %>
<% end %>

<main id="main-content" class="crayons-layout">
  <header class="px-2 m:px-0">
    <h1><%= title_string %></h1>
  </header>

  <div class="grid gap-2 m:gap-4 l:gap-6 m:grid-cols-2 l:grid-cols-3 px-2 m:px-0">
    <% if @collections.present? %>
      <% @collections.each do |collection| %>
        <div class="crayons-card branded-4 p-4 m:p-6 m:pt-4 flex flex-col relative">
          <h3 class="mb-2">
            <%= collection_link(collection, class: "crayons-link") %>
          </h3>
        </div>
      <% end %>
    <% else %>
      <p><%= t("views.series.empty") %></p>
    <% end %>
  </div>
</main>
